RE: Solution : server-based synchronization ? Posted by ~Delores Elnitexli on 24.Jun.03 at 03:22 AM using a Web browser Category: General Release: 6.0 Platform: Windows XP
Well I finally cracked it with the help of a trace utility from Sony Ericsson support.
It looks like the sync software can't cope with calendar entries whose body doesn't exist or is 0 length.
I wrote a little program to fix my calendar and now it works beautifully
Program follows use at your own risk (early versions renamed a bunch of my meetings to FIXSYNC !!)
- call with no parameters to see if you have a problem
- run with -fix to fix it
You will have to change the database path on the get database call
[Sorry about the indentation - it is OK in the HTML :-)]
#include <stdlib.h>
#include <stdio.h>
#include <lncppapi.h>
void main( int argc, char *argv[] )
{
LNNotesSession session; // create session object on stack
LNDatabase db; // Create LNDatabase object
LNViewFolder view; // Create LNViewFolder object
LNVFEntry entry; // Working entry
char *call= "None"; // Current call
int count;
int c;
int fix = 0;
if (argc == 2 && !strcmp(argv[1], "-fix"))
fix = 1;
LNSetThrowAllErrors(TRUE);
try
{
call = "Init";
session.Init();
call = "GetDatabase";
session.GetDatabase("c:\\Lotus\\Notes\\Data\\<your database here>.nsf", &db);
call = "Database Open";
db.Open();
call = "GetViewFolder";
db.GetViewFolder("Meetings", &view);
call = "View Open";
view.Open();
call = "View GetEntryCount";
count = view.GetEntryCount();
if (count != 0)
{
call = "GotoFirst";
view.GotoFirst(&entry);
for (c = 0; c < count; ++c)
{
LNDocument doc;
LNText text;
call = "Entry GetDocument";
entry.GetDocument(&doc);
call = "Document Open";
doc.Open();
call = "Document HasItem";
if (!doc.HasItem("Body") || doc.GetItemType("Body") != LNITEMTYPE_RICHTEXT)
{
LNString str;
call = "Document GetItem Subject";
doc.GetItem("Subject", &text);
call = "Text GetText";
text.GetText(&str);
printf("Found missing body item %d \"%s\"", c, (const char *)str);
if (fix)
{
LNRichText rtext;
call = "rtext SetValue";
rtext.SetValue("FIXSYNC1");
call = "CreateItem";
doc.CreateItem("Body", rtext, LNITEMFLAGS_AUTO_SUMMARY, LNITEMOPTION_DELETE_APPEND);
printf(" FIXED");
}
printf("\n");
}
else if (doc.HasItem("Body") && doc.GetItemType("Body") == LNITEMTYPE_RICHTEXT)
{
LNRichText rtext;
doc.GetItem("Body", &rtext);
if (rtext.GetValueSize() == 0)
{
LNString str;
call = "Document GetItem Subject";
doc.GetItem("Subject", &text);
call = "Text GetText";
text.GetText(&str);
printf("Found empty body item %d \"%s\"", c, (const char *)str);
if (fix)
{
rtext.SetValue("FIXSYNC2");
printf(" FIXED");
}
printf("\n");
}
}
if (fix)
{
call = "Document Save";
doc.Save();
}
call = "Document close";
doc.Close();
call = "View GotoNext";
view.GotoNext(&entry);
}
}
call = "View Close";
view.Close();
call = "Database close";
db.Close();
call = "Session term";
session.Term();
}
catch(LNSTATUS error)
{
char errorBuf[LNERROR_MESSAGE_LENGTH];
LNGetErrorMessage(error, errorBuf);
printf("Error: [%s] %s\n", call, errorBuf);
}
}
Synchronization with a Sonyericsson... (~Mary Ekfree 31.Jan.03)
. . RE: Synchronization with a Sonyeric... (~Chris Opfootex... 31.Jan.03)
. . . . RE: Synchronization with a Sonyeric... (~Sigmund Ophipi... 3.Feb.03)
. . . . . . RE: Synchronization with a Sonyeric... (~Chris Opfootex... 3.Feb.03)
. . RE: Synchronization with a Sonyeric... (~Mary Nimamaret... 7.Feb.03)
. . . . RE: Synchronization with a Sonyeric... (~Cheryl Prenuko... 8.May.03)
. . . . Works with Notes 6.05!! (~Anita Elhipiso... 19.May.03)
. . . . . . 6.05?? (~Holly Minjipyb... 20.May.03)
. . . . RE: Synchronization with a Sonyeric... (~Helga Desfoobu... 9.Jun.03)
. . RE: Synchronization with a Sonyeric... (~Chris Opfootex... 8.Feb.03)
. . . . RE: Synchronization with a Sonyeric... (~Arnold Bubreso... 1.Aug.03)
. . . . RE: Synchronization with a Sonyeric... (~Mary Nimamaret... 10.Feb.03)
. . . . . . RE: Synchronization with a Sonyeric... (~Chris Opfootex... 10.Feb.03)
. . . . . . . . RE: Synchronization with a Sonyeric... (~Mary Nimamaret... 11.Feb.03)
. . . . . . . . . . RE: Synchronization with a Sonyeric... (~Chris Opfootex... 11.Feb.03)
. . . . . . . . . . . . RE: Synchronization with a Sonyeric... (~Mary Nimamaret... 11.Feb.03)
. . . . . . . . . . . . . . RE: Synchronization with a Sonyeric... (~Delores Elnite... 6.Apr.03)
. . . . . . . . . . . . . . . . RE: Synchronization with a Sonyeric... (~Delores Elnite... 7.Apr.03)
. . . . . . . . . . . . . . . . . . RE: Synchronization with a Sonyeric... (~Chris Opfootex... 7.Apr.03)
. . . . . . . . . . . . . . . . . . RE: Synchronization with a Sonyeric... (~Sanjay Revelus... 16.Apr.03)
. . . . . . . . . . . . . . . . . . . . RE: Synchronization with a Sonyeric... (~Chris Opfootex... 16.Apr.03)
. . . . . . . . . . . . . . . . . . RE: Synchronization with a Sonyeric... (~Sanjay Revelus... 16.Apr.03)
. . . . . . . . . . . . . . . . . . RE: Synchronization with a Sonyeric... (~Ted Minjumiver... 17.Apr.03)
. . . . . . . . . . . . . . . . . . RE: interesting... how did you mana... (~Delores Elnite... 24.Jun.03)
. . . . . . . . RE: Synchronization with a Sonyeric... (~Yoshi Froather... 26.Feb.03)
. . . . . . . . . . RE: Synchronization with a Sonyeric... (~Justin Zekboos... 9.Apr.03)
. . . . . . . . . . . . RE: Synchronization with a Sonyeric... (~August Ciskrol... 10.Apr.03)
. . . . . . . . RE: Synchronization with a Sonyeric... (~Lex Asakrokony... 4.Nov.03)
. . RE: Synchronization with a Sonyeric... (~Helga Desfoobu... 26.Jun.03)
. . RE: Synchronization with a Sonyeric... (~Richard Lopluz... 24.Jul.03)
. . Synchronization with a Sonyericsson... (~Bill Breponege... 10.Nov.03)
. . . . RE: Synchronization with a Sonyeric... (~Bill Breponege... 12.Nov.03)
. . New PCSuite 2.0.1 supports 6.0 and ... (~Chris Opfootex... 21.Oct.03)
. . RE: Synchronization with a Sonyeric... (~Dan Eknutex 22.Feb.03)
. . . . Solution : server-based synchroniza... (~Laura Brea 18.Mar.03)
. . . . . . RE: Solution : server-based synchro... (~Patti Opfanama... 3.Apr.03)
. . . . . . . . RE: Solution : server-based synchro... (~Delores Elnite... 24.Jun.03)
. . . . . . . . . . RE: Solution : server-based synchro... (~Chloe Reboosis... 2.Jul.03)
. . . . . . . . . . RE: Solution : server-based synchro... (~Chris Opfootex... 26.Jun.03)
. . . . . . . . . . . . RE: Solution : server-based synchro... (~Dan Ekgeropul 9.Jul.03)
. . No support for R6 !!! (~Tanita Desboos... 27.Aug.03)
. . . . RE: No support for R6 !!! (~Evelyn Dwotumi... 30.Sep.03)
. . . . . . RE: No support for R6 !!! (~Chloe Reboosis... 1.Oct.03)
. . . . . . RE: No support for R6 !!! (~Chris Opfootex... 21.Oct.03)
Document Options
Search this forum
RSS Feeds